feat(wlx/logview): implement regex-based line background and foreground highlighting#30
Open
pplupo wants to merge 19 commits into
Open
feat(wlx/logview): implement regex-based line background and foreground highlighting#30pplupo wants to merge 19 commits into
pplupo wants to merge 19 commits into
Conversation
This commit introduces a specialized log viewer WLX plugin built with Qt6 and C++20. It is designed to handle massive log files without freezing Double Commander, utilizing zero-copy file loading (mmap), fast regex searching (RE2), and a robust focus-isolation architecture for Wayland. Committed files: - Source code (src/) for the log model and viewer widget - CMakeLists.txt for build configuration - README.md and detailed design doc (double commander wlx log viewer.md) - logviewer.png screenshot asset - Integration into root build.sh for automated release packaging
…nd highlighting - Export ListSetDefaultParams to retrieve and bind the host's INI file path. - Add HighlightRule structure and fast RE2-based line matching directly on memory-mapped offsets. - Create Highlighting Rules SettingsDialog modal with an inline-colored rules list. - Enable ExtendedSelection on the rules list to support deleting or moving multiple rules up/down, maintaining selection state using QItemSelectionModel. - Connect double-click on any rule row to open the editing window. - Write Foreground/Background labels above color picker buttons in RuleDialog. - Implement session persistence under [HighlightRules] in the INI file. - Prevent default rules from overriding empty rule configurations on restart. - Add context-aware "Add Default Rules" button to prepend default log levels relative to the current selection. - Create sample.log matching each level for diagnostics.
This commit introduces a premium editor WLX plugin based on Native Qt6 and KDE's KTextEditor framework. It brings full syntax highlighting, code folding, and advanced editing capabilities to Double Commander's viewer panel without LCL compatibility crashes on Wayland. Committed files: - Source code (src/) wrapping KTextEditor - CMakeLists.txt for build configuration - README.md with screenshots - defects.md tracking known issues and resolutions - Screenshot assets (kate_java.png, kate_md.png, kate_py.png) - Integration into root build.sh for automated release packaging
…yles, preserve selection, and fix Proper/Title Case logic
…nd highlighting - Export ListSetDefaultParams to retrieve and bind the host's INI file path. - Add HighlightRule structure and fast RE2-based line matching directly on memory-mapped offsets. - Create Highlighting Rules SettingsDialog modal with an inline-colored rules list. - Enable ExtendedSelection on the rules list to support deleting or moving multiple rules up/down, maintaining selection state using QItemSelectionModel. - Connect double-click on any rule row to open the editing window. - Write Foreground/Background labels above color picker buttons in RuleDialog. - Implement session persistence under [HighlightRules] in the INI file. - Prevent default rules from overriding empty rule configurations on restart. - Add context-aware "Add Default Rules" button to prepend default log levels relative to the current selection. - Create sample.log matching each level for diagnostics.
Manually merged unique changes from all editor-related branches: - editor-features: focus management (NoFocus on menuBar, focus restoration, focus-stealing prevention), Save/Save As/Save Copy As actions with toolbar button, Print action with toolbar button, font zoom controls (Ctrl++/Ctrl+-/ Ctrl+0) with native KTE action fallback, Force RTL Direction toggle, Ctrl+Shift+S Save As shortcut precedence fix, QTimer-based focus restoration - kate-case-conversion: Capitalization submenu replacing flat menu items, improved Title Case with minor-word handling, fixed Proper Case (toLower instead of preserve), renamed snail_case to snake_case, added PascalCase, SCREAMING_SNAKE_CASE, kebab-case, Sentence case, SCREAMING-KEBAB-CASE, dot.case, path/case, replaceSelectionPreservingRange helper to restore selection after text replacement - fix-redo-and-write-lock: Ctrl+Shift+Z redo shortcut (in addition to Ctrl+Y), extracted toggleReadOnly() helper, Alt+Shift+R shortcut for read-only toggle, fixed double-trigger bug by switching QAction::toggled to QAction::triggered, added shortcut labels to read-only menu action
…, and kate-case-conversion into kate base
…r UX, and save selected lines to a new file.
Conflicts: build.sh wlx/logview/README.md wlx/logview/logviewer.png wlx/logview/src/LogViewerWidget.cpp wlx/logview/src/LogViewerWidget.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces regex-based line background and foreground highlighting for the Qt6 Log Viewer lister plugin in Double Commander.
Key Improvements:
Fast Highlighting Engine:
re2::RE2regex evaluation on memory-mapped offsets inside the log model'sdata()method, avoiding overhead or allocation ofQStringobjects for non-matching lines.Refined Highlighting Settings UI:
RuleDialogwith labeled standard OS color pickers to customize rule colors.Context-Aware Defaults:
TRACE,DEBUG,INFO,WARN,ERROR,FATAL) either at the top of the list or above the top-most selected rule to avoid disrupting your configuration.Robust Configuration Persistence:
ListSetDefaultParamslps interface to bind the INI file path.[HighlightRules]in the configuration INI.Testing Harness:
sample.logwith realistic logs corresponding to each log level and rule to facilitate immediate visual verification of configurations.